package com.sunye.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunye.shardingjdbc.Course;
import com.sunye.shardingjdbc.ResponseCourse;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CourseDao extends BaseMapper<Course> {

    @Select("select a.teacher_name,c.* from course_user_info " +
            "a left join course c on a.user_id = c.user_id where a.user_id = '100'" +
            " order by c.cstatus desc limit 5 ")
    List<ResponseCourse> findCourseJoin();

}
